#ifndef _CSHIELD_H_
#define _CSHIELD_H_

#include "CAnimatedObject.h"
#include "cocos2d.h"
#include "Box2D\Box2D.h"
//Forward declaration
class CShip;

/**
 * Handles the shield animation.
 */
class CShield : public CAnimatedObject
{
public:
	CShield();
	bool init(CShip* pShip, char* frameNamePrefix, cocos2d::CCSpriteBatchNode* pSpriteSheet, b2World* pWorld);
	void hit();
	void restoreSprite();
	void createBoxBody();
	void collision(float damage);

private:
	/**
	 * The ship is created and release by the MainLayer.
	 */
	CShip* _pShip;
};

#endif //_CSHIELD_H_
